<!--title-->
<div class="mnav1">
    <div class="m_nav">
        <div class="nav_left">
            <em class="home_icon"><?=$this->sys_name?></em><span>&nbsp;&gt;&nbsp;</span><font><?=$this->title?></font>
        </div>
    </div>
</div>

<div class="content-table">
    <div class="content-table-title"><?=$this->title?></div>
    <br />
    <?php if($this->msg):?>
        <div class="replace"><?=$this->msg?></div>
        <br />
    <?php endif;?>
        <div align="center"><a href="/others/product-managers-add"><font color="green"><b>【绑定新规则】</b></font></a></div>
        <br />
    <table>
        <tr>
            <th>产品</th>
            <th>执行主管</th>
            <th>操作权</th>
            <th>状态</th>
            <th width="120">操作</th>
        </tr>
        <?php if($this->data):?>
        <?php foreach($this->data as $data):?>
                <tr>
                    <td><?=$data['product_name']?></td>
                    <td><?=$data['username']?> (<?=$data['realName']?>)</td>
                    <td><?=($data['is_primary']?"有":"")?></td>
                    <td style="color: <?=($data['status']?"green":"red")?>"><?=($data['status']?"正常":"冻结")?></td>
                    <td><button type="button" class="btn1" data="<?=$data['id']?>">删除</button></td>
                </tr>
            <?php endforeach;?>
        <?php endif;?>
    </table>

    <script>
        $(".btn1").click(function() {
            var r=confirm("确定要删除吗？")
            id= $(this).attr('data');

            if(r == true){
                window.location.href = "/others/product-managers-del/id/"+id;
            }

        });
    </script>